package com.szq.netty.util;

import com.szq.netty.domain.ServerInfo;
import com.szq.netty.server.NettyServer;
import io.netty.channel.Channel;

import java.util.Collections;
import java.util.HashMap;
import java.util.Map;

/**
 * @ClassName: CacheUtil
 * @Description:
 * @Author: szq
 * @Date: 2021-11-18 15:41:00
 */
public class CacheUtil {

    // 缓存channel
    public static Map<String, Channel> cacheChannel = Collections.synchronizedMap(new HashMap<>());

    // 缓存服务信息
    public static Map<Integer, ServerInfo> serverInfoMap = Collections.synchronizedMap(new HashMap<>());

    // 缓存服务端
    public static Map<Integer, NettyServer> serverMap = Collections.synchronizedMap(new HashMap<>());
}
